import React from 'react';
import { useRoutes } from 'react-router-dom';

const HlDataCenter = React.lazy(() => import('@/pages/hlDataCenter'));
const JHDataCenter = React.lazy(() => import('@/pages/jhDataCenter')); 
const NotFound = React.lazy(() => import('@/pages/notFound'));

const MyRoutes = () => {
  const routes = useRoutes([
    {
      path: '/',
      element: <JHDataCenter />,
    },
    {
      path: '/jhdatacenter',
      element: <JHDataCenter />,
    },
    {
      path: '/hldatacenter',
      element: <HlDataCenter />,
    },
    {
      path: '*',
      element: <NotFound />,
    },
  ]);
  return routes;
};

export default MyRoutes;
